from gxl_ai_utils.utils import utils_file


def make_data():
    aslp_data = utils_file.AslpDataset()
    aslp_data.print_all_keys()
    asru700 = aslp_data.get_path_info_by_key_or_id(65)
    asru_shard_list = asru700['shard_list']
    print(asru_shard_list)
    utils_file.copy_file(asru_shard_list, './data/asru_all.shards')
    list_all = utils_file.load_list_file_clean('./data/asru_all.shards')
    list_train = list_all[:int(len(list_all) * 0.8)]
    list_dev = list_all[int(len(list_all) * 0.8):int(len(list_all) * 0.9)]
    list_test = list_all[int(len(list_all) * 0.9):]
    utils_file.write_list_to_file(list_train, './data/asru_train.shards')
    utils_file.write_list_to_file(list_dev, './data/asru_dev.shards')
    utils_file.write_list_to_file(list_test, './data/asru_test.shards')


if __name__ == '__main__':
    make_data()
